<?php

declare(ENCODING = 'UTF-8');

/*                                                                        *
 * This script is part of the TYPO3 project - inspiring people to share!  *
 *                                                                        *
 * TYPO3 is free software; you can redistribute it and/or modify it under *
 * the terms of the GNU General Public License version 2 as published by  *
 * the Free Software Foundation.                                          *
 *                                                                        *
 * This script is distributed in the hope that it will be useful, but     *
 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHAN-    *	
 * TABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General      *
 * Public License for more details.                                       *
 *                                                                        */	

/**
 * @package auxo
 * @subpackage Web
 * @version $Id$
 */

/**	
 * The Request Interceptor Interface
 * 
 * Intercepts the excution of the request handler. Application can registered a free list of 
 * interceptors e.g. to handle security aspects, session handling, etc. Interceptors are 
 * executed in a process chain.
 *	
 * @package auxo
 * @subpackage Web
 * @version $Id$	
 * @copyright Copyright belongs to the respective authors
 * @author AHN
 * @license http://opensource.org/licenses/gpl-license.php GNU Public License, version 2
 */
class tx_auxo_RequestInterceptorInterface {
	
	/**
	 * Intercepts the excution of the before passing a request to a request handler. 
	 * 
	 * @param tx_auxo_Request $request
	 * @param tx_auxo_Response $response
	 * @return boolean $continue true if the execution chain should proceed with the next interceptor. Else, it assumes this intersceptor has already handle the response itself.
	 */
	public function preProcess(tx_auxo_Request $request, tx_auxo_Response $response);
	
	/**
	 * Intercepts the excution of the after passing a request to a request handler. 
	 * 
	 * @param tx_auxo_Request $request
	 * @param tx_auxo_Response $response
	 * @return boolean $continue true if the execution chain should proceed with the next interceptor. Else, it assumes this intersceptor has already handle the response itself.
	 */	
	public function postProcess(tx_auxo_Request $request, tx_auxo_Response $response);
}
?>